Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output an appropriate warning when a cross info file does not exist. #2021

Merged
merged 2 commits into from Jul 2, 2017

Conversation

Jehan
Copy link
Contributor

@Jehan Jehan commented Jul 1, 2017

If making a typo, it used to output:

Cross info file must have either host or a target machine.
This was not useful at all and looked like there could be a file format
error or some other issue with the content. Let's have an appropriate
error:
File not found: /some/path


To show how confusing the old error was, I created the issue #2020 because I was just sure something was wrong with my file, while in fact meson was simply not reading my file because I had a typo in the command line (hyphen mistyped into underscore). It took me several dozens of minutes of searching the web for syntax issues, then even looking at meson code until I discovered the boring truth!
A "File not found" error will be far more obvious.

If making a typo, it used to output:
>  Cross info file must have either host or a target machine.
This was not useful at all and looked like there could be a file format
error or some other issue with the content. Let's have an appropriate
error:
> File not found: /some/path
I got this warning on a build:
> WARNING: Passed invalid keyword argument preset. This will become a hard error in the future.
I had to grep in meson code to understand that "preset" was the name of
the invalid argument. This is not obvious at all depending on the
argument name (here it looked like it was about argument presets).
Let's make it clearer by putting it in quotes.
@Jehan
Copy link
Contributor Author

Jehan commented Jul 1, 2017

I added another commit for a warning which was really not explicit either!

@codecov-io
Copy link

codecov-io commented Jul 1, 2017

Codecov Report

Merging #2021 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2021      +/-   ##
=========================================
- Coverage    63.9%   63.9%   -0.01%     
=========================================
  Files          71      71              
  Lines       17046   17051       +5     
  Branches     3506    3506              
=========================================
+ Hits        10894   10897       +3     
- Misses       5081    5083       +2     
  Partials     1071    1071
Impacted Files Coverage Δ
mesonbuild/interpreterbase.py 71.72% <0%> (ø) ⬆️
mesonbuild/modules/__init__.py 90.14% <0%> (ø) ⬆️
mesonbuild/environment.py 71.77% <66.66%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0ab6e9...38f2e1f. Read the comment docs.

@jpakkane
Copy link
Member

jpakkane commented Jul 2, 2017

Great, thanks.

@jpakkane jpakkane merged commit 2f69141 into mesonbuild:master Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants